Skip to content

fix: ban empty anonymous nodes with diagnostic#283

Merged
zharinov merged 1 commit intomasterfrom
fix/empty-anonymous-node
Jan 6, 2026
Merged

fix: ban empty anonymous nodes with diagnostic#283
zharinov merged 1 commit intomasterfrom
fix/empty-anonymous-node

Conversation

@zharinov
Copy link
Copy Markdown
Member

@zharinov zharinov commented Jan 6, 2026

Summary

  • Add EmptyAnonymousNode diagnostic for "" and '' in queries
  • Error message: "empty anonymous node" with hint "use a valid anonymous node or remove it"
  • Empty strings still parse to valid CST (error recovery) and compile to wildcard behavior in IR

Why

Empty anonymous nodes like "" are almost certainly user errors — they match nothing useful. This adds a clear diagnostic to guide users toward valid syntax.

@zharinov zharinov enabled auto-merge (squash) January 6, 2026 12:34
@zharinov zharinov merged commit 940d6f9 into master Jan 6, 2026
4 checks passed
@zharinov zharinov deleted the fix/empty-anonymous-node branch January 6, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant